	<h1>Leave Information</h1>
	<%= render :partial => 'breadcrumbs' %>
	<div class="extralinks">
	<%@leave_types.each do |leave_type|%>
  <%=link_to leave_type.title, :action => 'show_leave_info',:id => leave_type.id%> | 
  <%end%> </div>
<img src="/images/cal_info2.png" />
<table class="tb_listing">
	<thead>
	<tr class="month">
		<td colspan="2"><h3>Leave List</h3></td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td width="11%">&nbsp;</td>
		<td width="1%">&nbsp;</td>
	</tr>
	<tr>
		<th width="19%">Employee Name</th>
		<th width="13%">Employee Id</th>
		<th width="14%">Start Date </th>
		<th width="11%">End Date </th>
		<th width="15%">Type of Leave</th>
		<th width="16%">Latest Remarks</th>
		<th>Total</th>
		<th>&nbsp;</th>
	</tr>
	</thead>
	<%@leaves.each do |leave|%>
	<tr class="<%= cycle "odd","even" %>">
	
		<td width="19%"><%=link_to leave.employee.name, :action => 'show_employe_leave', :id => leave.employee_id%></td>
		<td width="13%"><%=leave.employee.employee_number%></td>
		<td><%=leave.start_date.strftime("%d %B %Y")%></td>
		<td><%=leave.end_date.strftime("%d %B %Y")%></td>
		<td><%=leave.leave_type.title%></td>
		<td><%=leave.remarks%></td>
		<td><%=@total = LeaveDetail.count(:conditions => ["employee_id = ? and year = ?",leave.employee_id,Time.now.year])%> days</td>
		<td>&nbsp;</td>
	</tr>
	<%end%>
</table>

<div class="pagination"> <%= will_paginate @leaves%></div> 

	